package it.amedeo.tmp;

public class TestEncriptDecript {
//	private static String encryptionKey = "ci vuole una chiave di cript decript almeno di 24 caratteri";
	private static String str="stringa da criptare decriptare";
	public static void main(String[] args) {
		try {
//			StringEncrypter encrypter =  new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME, encryptionKey );
			StringEncrypter encrypter =  new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME, StringEncrypter.DEFAULT_ENCRYPTION_KEY );
			String encryptedString = encrypter.encrypt(str);
			
			str = encryptedString;
		}
		catch (Exception e) {
			e.printStackTrace();
		}
		
		
		try {
//			StringEncrypter decrypter =  new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME, encryptionKey );
			StringEncrypter decrypter =  new StringEncrypter(StringEncrypter.DES_ENCRYPTION_SCHEME, StringEncrypter.DEFAULT_ENCRYPTION_KEY );
			String decryptedString = decrypter.decrypt(str);

			String albe = decryptedString;
		}
		catch (Exception e) {
		}
	}
}
